chore(gen2-migration): e2e enhancements#14768
Merged
iliapolo merged 4 commits intogen2-migrationfrom Apr 10, 2026
Merged
Conversation
…and add gen2-migration skill Move sanitize and snapshot capture logic into the e2e-system package so that sanitization runs automatically as part of the E2E flow. Simplify the migration-apps sanitize.ts and snapshot.ts to delegate to the shared implementation. Add a gen2-migration development skill with context references and a development loop for bug fixes and new features. Minor fixes to gitignore generator and refactor output directory. --- Prompt: we are working on the gen2-migration skill and e2e snapshot capture improvements
Streamline the gen2-migration skill with structured Context and Development Loop sections covering bug fix and feature workflows. Add missing E2E snapshot capture step to "Adding an App" and "Modifying an App" sections in the migration apps README. --- Prompt: refine the gen2-migration skill and fix missing E2E step in migration apps README
Remove git wrapper methods and call this.git.* directly. Move migrate() next to the other migration methods. Reorganize class sections (Tests, Hooks). Filter updateSnapshots to only copy _snapshot directories. --- Prompt: commit
Add deploy npm script to all migration apps. Fix snapshot.ts usage string and README to match new argument signature. Add JSDoc to new public members. Update PR template headings to h3. Update AGENTS.md PR body instructions with grouping guidance. --- Prompt: add deploy script to all apps, check for outdated docstrings, update PR template and AGENTS.md
packages/amplify-gen2-migration-e2e-system/src/core/sanitize.ts
Dismissed
Show dismissed
Hide dismissed
packages/amplify-gen2-migration-e2e-system/src/core/snapshot.ts
Dismissed
Show dismissed
Hide dismissed
packages/amplify-gen2-migration-e2e-system/src/core/snapshot.ts
Dismissed
Show dismissed
Hide dismissed
dgandhi62
reviewed
Apr 10, 2026
dgandhi62
reviewed
Apr 10, 2026
dgandhi62
reviewed
Apr 10, 2026
dgandhi62
reviewed
Apr 10, 2026
dgandhi62
reviewed
Apr 10, 2026
dgandhi62
reviewed
Apr 10, 2026
dgandhi62
reviewed
Apr 10, 2026
dgandhi62
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
This PR consolidates snapshot capture and sanitization logic into the E2E system
package, and adds a development skill for the gen2-migration feature.
The main motivation: snapshot capture and sanitization were manual steps that had to be
run separately after E2E tests. Now both are integrated into the E2E system and run
automatically when
UPDATE_SNAPSHOTS=1is set.Automated snapshot capture and sanitization
Snapshot capture functions and sanitization logic are now shared modules in the E2E system
package. The E2E workflow captures snapshots at each step (pre/post generate, pre/post
refactor) and sanitizes and updates them automatically when
UPDATE_SNAPSHOTS=1is set. Themigration-apps scripts now delegate to these shared modules.
Improved sanitization
Sanitization now also covers Gen2 API keys from
_snapshot.pre.refactor/outputs and OSusernames from sandbox stack names.
E2E system improvements
The
Appclass owns the full migration workflow viadeploy()andmigrate()methods,with snapshot capture integrated at each step. Git wrapper methods replaced with direct
this.git.*calls. The CLI gains a--stepoption (deployormigrate) for runningpartial workflows, and a
deploynpm script was added to all apps.Refactor output directory rename
Changed from
.amplify/refactor.operationsto.gen2-migration/refactor.operationstoavoid conflicts with the Amplify directory. Updated gitignore entries in both the generator
and migration apps accordingly.
Documentation
Migration apps README simplified with updated snapshot capture tool usage, E2E snapshot step
added to "Adding an App" and "Modifying an App" sections.
Gen2-migration development skill
New
.kiro/skills/gen2-migration/SKILL.mdwith context references (docs, code, apps) andstep-by-step workflows for bug fixes and new features.
Issue #, if available
N/A
Description of how you validated changes
Checklist
yarn testpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.